home *** CD-ROM | disk | FTP | other *** search
- /* searchpicture.frx
- * Search for a picture name
- * Copyright © 1996-1997 Nils Bandener
- * $VER: searchpicture_frx 6.3 (6.10.97)
- */
-
- Options Results
- Options FailAt 21
-
- scriptname = "Search Picture"
- fiasco_port = address()
-
- Signal on Syntax
- Signal on Halt
- Signal on Break_C
- Signal on Failure
-
- LockGUI
-
- /*
- * Constant values
- */
-
- DTFieldsInRecord = 8
-
- RequestString 'Title "Search for picture" Text "Please enter part of*nfile name to search for"'
-
- if rc = 0 then
- do
- Pattern = Result
-
- CountRecords
- NumRecs = Result
-
- do i = 1 to NumRecs
-
- do k = 1 to DTFieldsInRecord
-
- GetField "Name_" || k "Record" i
- Cont = Result
-
- if Cont ~= "" then
- do
- if pos(Pattern, Cont) ~= 0 then
- do
- ActiveRecord Record i
-
- call picinfo.frx(k)
-
- RequestChoice '"Continue Searching?" "Yes|No" "Search for picture"'
-
- if result = 0 then halt
- end
- end
- end
- end
- end
-
- bail_out:
-
- Address Value fiasco_port
-
- UnlockGUI
- ResetStatus
-
- exit
-
- syntax:
- failure:
-
- if show("Ports", fiasco_port) then
- do
- Address Value fiasco_port
-
- RequestChoice '"Error ' || rc || ' in line ' || sigl || ':*n' || errortext(rc) || '" "Cancel" Title "' || scriptname || '"'
- end
- else
- do
- say "Error" rc "in line" sigl ":" errortext(rc)
- say "Enter to continue"
- pull dummy
- end
-
- call bail_out
-
- halt:
- break_c:
-
- if show("Ports", fiasco_port) then
- do
- Address Value fiasco_port
-
- RequestChoice '"Script Abort Requested" "Abort Script" Title "' || scriptname || '"'
-
- if result = 0 then return
- end
- else
- do
- say "*** Break"
- say "Enter to continue"
- pull dummy
- end
-
- call bail_out
-
-
-